﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace B10.Models
{
    public class UserPageManager
    {
        private IDatabaseRepository _db;

        public UserPageManager(IDatabaseRepository db)
        {
            _db = db;
        }
        public UserPageManager() : this(new DatabaseRepository())
        { }

        public void SetPageStatus(int pageID, bool accept)
        {
            UserPage page = this._db.GetPage(pageID);
            page.Status = accept ? PageStatus.Accepted : PageStatus.Deny;

            this._db.Save();
        }
    }
}
